package com.study.lihan;

import lombok.extern.slf4j.Slf4j;
import org.openjdk.jol.info.ClassLayout;
/*
-XX:+UseBiasedLocking
-XX:BiasedLockingStartupDelay=0
* */

@Slf4j(topic = "c. TestBaisedLazy")
public class TestBaisedLazy {
    public static void main(String[] args) {
      /*  try {
            Thread.sleep(4000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }*/
        Object obj = new Object();
        log.info(ClassLayout.parseInstance(obj).toPrintable());
        synchronized (obj){
            log.info("代码块");
            log.info(ClassLayout.parseInstance(obj).toPrintable());
        }
        log.info(ClassLayout.parseInstance(obj).toPrintable());

    }
}
